﻿
@{
    Layout = null;
}

<!doctype html>
<html>

<head>
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
    <script src="https://www.layuicdn.com/layui/layui.js"></script>
    <script src="~/layui/jquery-3.4.1.js" type="text/javascript" charset="utf-8"></script>
    <link rel="shortcut icon" href="~/favico.ico" />
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Sign in</title>
    <link rel="stylesheet" href="~/Scripts/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="~/Scripts/assets/css/bootsnav.css">
    <link rel="stylesheet" href="~/Scripts/assets/css/style.css">
    <link rel="stylesheet" href="~/Scripts/assets/css/responsive.css">

</head>

<body>
    <section class="signin">
        <div class="container-fluid">
            <div class="row">

                <div class="col-sm-4">
                    <div class="single-sign">
                        <div class="sign-bg">
                        </div><!--/.sign-bg -->
                    </div><!--/.single-sign -->
                </div><!--/.col -->
                <div class="col-sm-8">
                    <div class="single-sign">
                        <div class="sign-content">
                            <h2 style="font-size:36px">Sign IN</h2>
                            @using (Html.BeginForm("", "", FormMethod.Post, new { @class = "layui-form", id = "form1" }))
                            {
                                <div class="signin-form">
                                    <div class=" ">
                                        <div class=" ">
                                            <div class="form-group">
                                                <label for="signin_form">用户名</label>
                                                <input type="text" name="U_LoginName" class="form-control"  placeholder="LoginName">
                                            </div>
                                            <div class="form-group">
                                                <label for="signin_form">密码</label>
                                                <input type="password" name="U_Password" class="form-control"  placeholder="Password">
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="signin-password">
                                    <div class="awesome-checkbox-list">
                                        <ul class="unstyled centered">
                                            <li>
                                                <label class="layui-form-label" style="width:120px">保持登陆状态</label>
                                                <div class="layui-input-block" style="margin-left:120px">
                                                    <input type="checkbox" name="rememberme" lay-skin="switch" lay-text="ON|OFF">
                                                </div>
                                            </li>
                                            <li>
                                                <a href="#"></a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            }
                            @*<form action="" class="layui-form" id="form1">
                                </form>*@
                            <div class="signin-footer">
                                <button type="button" class="btn signin_btn" id="Login" data-toggle="modal">
                                    登 陆
                                </button>
                            </div>
                        </div>
                    </div><
                </div>
            </div>
        </div>
    </section>
    <footer class="footer-copyright">
        <div id="scroll-Top">
            <i class="fa fa-angle-double-up return-to-top" id="scroll-top" data-toggle="tooltip" data-placement="top" title="" data-original-title="Back to Top" aria-hidden="true"></i>
        </div>
    </footer>
    <script src="~/Scripts/assets/js/bootstrap.min.js"></script>
    <script src="~/Scripts/assets/js/bootsnav.js"></script>
    @*<script src="~/Scripts/assets/js/jquery.sticky.js"></script>*@
    <script src="~/Scripts/assets/js/custom.js"></script>
    <script>
        layui.use(['form', 'layer'], function () {
            $('#Login').click(function () {
                var formData = $('#form1').serializeArray();
                $.ajax({
                    url: '/Home/SignINRse',
                    type: 'post',
                    data: formData,
                    beforeSend: function () {
                        layer.load()
                        $("#Login").attr({ disabled: "disabled" });
                    },
                    success: function (data) {
                        if (data.code == 0) {
                            window.location.href = data.data;
                        } else {
                            layer.msg(data.msg, { icon: 2 })
                        }
                        $("#Login").removeAttr("disabled")
                        layer.closeAll('loading');
                    },
                    error: function (data) {
                        layer.msg(data.msg, { icon: 2 })
                        $("#Login").removeAttr("disabled")
                        layer.closeAll('loading');
                    }
                })
            })
        })

    </script>
</body>

</html>